package com.moteur.analysersite.seo;

import java.io.IOException;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import com.moteur.analysersite.util.TimeOut;

public class LabMAin {

	/**
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) {
		TimeOut timeOutSecond = TimeOut.getInstance();
		Document doc;
		try {
			doc = Jsoup.connect("http://mkyong.com")
					.timeout(timeOutSecond.getTimeout() * 1000).get();

			// System.out.println(doc.select("body").html());
			System.out.println(doc.select("html").attr("lang"));
			System.out.println(doc.select("style").size());
			System.out.println(doc.select("link[type=text/css]").size());
			System.out.println(doc.select("meta[name=keywords]")
					.attr("content").split(","));
			System.out.println(doc.select("meta[name=description]")
					.attr("content").split(",").length);
			// System.out.println(doc.select("meta[name=keywords]").attr("content"));
		} catch (IOException e) {
			System.out.println("url non valider");
		}
	}
}
